{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import requests\n",
    "from pyquery import PyQuery as pq\n",
    "\n",
    "url = 'http://sta.quchaogu.com/dxw/css/header_charts.css'\n",
    "r = requests.get(url)\n",
    "#实例化\n",
    "doc = pq(r.text)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<p>]"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "doc\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "doc('Main__StyledWrap-sc-1yvvyr1-0 iPjAOF')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "''"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "doc('Main__StyledWrap-sc-1yvvyr1-0 iPjAOF').text()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "lis = doc('h2.content-title').items()\n",
    "for li in lis:\n",
    "    print(li.text())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<!DOCTYPE html>\n",
      "<html lang=\"zh-CN\">\n",
      "<head>\n",
      "    <meta charset=\"utf-8\">\n",
      "    <title>短线王-为短线交易而生！专业的短线盯盘和交易辅助工具</title>\n",
      "    <meta content=\"量化投资，大数据选股，打板选股，资金选股，选股策略，涨停板，机构选股\" name=\"keywords\">\n",
      "    <meta content=\"短线王，为短线交易而生！专业的短线盯盘工具，辅助股民打板交易！\" name=\"description\">\n",
      "\n",
      "    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\n",
      "    <meta name=\"renderer\" content=\"webkit\">\n",
      "    <meta content=\"keenthemes\" name=\"author\">\n",
      "    <link rel=\"shortcut icon\" href=\"//idxw.oss-cn-beijing.aliyuncs.com/icon/favicon.ico\">\n",
      "\n",
      "    <link href=\"//sta.quchaogu.com/amd/lib/bootstrap3/bootstrap.css?v=201904291500\" rel=\"stylesheet\">\n",
      "    <!--[if lt IE 9]>\n",
      "    <link href=\"//sta.quchaogu.com/amd/common/css/ie8.css\" rel=\"stylesheet\">\n",
      "    <script src=\"//sta.quchaogu.com/amd/lib/respond/html5shiv.min.js\"></script>\n",
      "    <script src=\"//sta.quchaogu.com/amd/lib/respond/respond.min.js\"></script>\n",
      "    <![endif]-->\n",
      "    <link href=\"//sta.quchaogu.com/dxw/css/header.css\" rel=\"stylesheet\">\n",
      "<!--    <script src=\"//sta.quchaogu.com/app/jquery.min.js\"></script>-->\n",
      "    <script src=\"https://code.jquery.com/jquery-3.4.1.min.js\"></script>\n",
      "    <script src=\"//sta.quchaogu.com/dxw/js/bootstrap.js\"></script>\n",
      "    <script type=\"text/javascript\" src=\"//sta.quchaogu.com/dxw/js/common.js\"></script>\n",
      "</head>\n",
      "<body>\n",
      "<div class=\"browser-ie67\" style=\"display: none;\">\n",
      "    <div><span>&nbsp;</span>您好，您目前使用的是旧版浏览器，建议使用更快、更好用的浏览器！如<a target=\"_blank\" href=\"http://windows.microsoft.com/zh-cn/internet-explorer/download-ie\">IE9以上</a>或者<a target=\"_blank\" href=\"http://se.360.cn\">360浏览器</a></div>\n",
      "</div>\n",
      "<div class=\"notice-board\" style=\"display: none;\">\n",
      "    <div><i></i><span></span></div>\n",
      "</div>\n",
      "<div class=\"clearfix\"></div>\n",
      "<div class=\"regression-header navbar navbar-default\" role=\"navigation\">\n",
      "    <!-- BEGIN HEADER -->\n",
      "    <div class=\"container\" style=\"padding: 0;\">\n",
      "        <div class=\"navbar-header\">\n",
      "            <a class=\"navbar-brand site-logo\" href=\"http://www.duanxianwang.cn/\" >\n",
      "                <img alt=\"短线王\" src=\"http://sta.quchaogu.com/dxw/img/logo.png?v=20170516\">\n",
      "            </a>\n",
      "\n",
      "        </div>\n",
      "        <div class=\"navbar-navigation\">\n",
      "            <ul class=\"list-inline pull-left\" role=\"tablist\">\n",
      "                <li class=\"\"><a href=\"http://www.duanxianwang.cn\">盯盘</a></li>\n",
      "                <!--<li class=\"\"><a href=\"https://www.duanxianwang.cn/news\">快讯</a></li>-->\n",
      "                <!--<li class=\"\"><a href=\"https://www.duanxianwang.cn/replay\">复盘</a></li>-->\n",
      "                <!--<li class=\"\"><a href=\"https://www.duanxianwang.cn/\">教学</a></li>-->\n",
      "                <li class=\"\"><a href=\"http://www.duanxianwang.cn/download\">下载APP</a></li>\n",
      "                <!--<li class=\"\"><a href=\"https://www.duanxianwang.cn/\">商场</a></li>-->\n",
      "                <li class=\"red-color ucenter\" data-widget=\"uc/js/pre_header.js#init\" data-toggle=\"tab\"> </li>\n",
      "            </ul>\n",
      "        </div>\n",
      "        <!--<div class=\"login-div-area\">-->\n",
      "\n",
      "            <!--<ul class=\"list-inline\" role=\"tablist\">-->\n",
      "                <!--<li >-->\n",
      "                    <!--<a href=\"/personal/center/index\">-->\n",
      "                        <!--<img src=\"//sta.quchaogu.com/bmw/admin/layout/img/avatar3_small.jpg\">-->\n",
      "                        <!--<span>王小二</span>-->\n",
      "                    <!--</a>-->\n",
      "                <!--</li>-->\n",
      "                <!--<li ><button class=\"btn btn-default\">登录/注册</button></li>-->\n",
      "                <!--<li ></li>-->\n",
      "            <!--</ul>-->\n",
      "        <!--</div>-->\n",
      "    </div>\n",
      "</div>\n",
      "<!-- END HEADER -->\n",
      "<div class=\"container-fluid\"></div>\n",
      "\n",
      "<script>\n",
      "//头导航栏 选择动态添加class\n",
      "(function () {\n",
      "    var urlHost = location.href;\n",
      "    var urlObj =  $(\".navbar-navigation ul a\");\n",
      "    for(var i = 0; i<urlObj.length;i++){\n",
      "        if(urlHost == urlObj[i].href){\n",
      "            $(\".navbar-navigation ul a:eq(\"+i+\")\").parent('li').addClass('active');\n",
      "            break;\n",
      "        }\n",
      "\n",
      "    }\n",
      "})();\n",
      "</script>\n",
      "\n",
      "\n",
      "\n",
      "<script type=\"text/javascript\" src=\"//sta.quchaogu.com/dxw/js/jquery.dotdotdot.js\"></script>\n",
      "<link href=\"//sta.quchaogu.com/dxw/css/newindex.css?v=1\" rel=\"stylesheet\">\n",
      "<div class=\"container\">\n",
      "    <div class=\"row clearfix\">\n",
      "            <!--  引入图表 -->\n",
      "            <link href=\"//sta.quchaogu.com/dxw/css/header_charts.css\" rel=\"stylesheet\">\n",
      "<div class=\"chart-board\">\n",
      "    <input type=\"hidden\" id=\"isTranDay\">\n",
      "    <div class=\"chart-type\">\n",
      "        <a class=\"chart-hgt active-tab block-rlink\" data-type=\"up\" href=\"javascript:;\" id=\"up\">\n",
      "\n",
      "        </a>\n",
      "        <a class=\"chart-hgt active-tab block-rlink\" data-type=\"shen\" href=\"javascript:;\" id=\"shen\">\n",
      "\n",
      "        </a>\n",
      "        <a class=\"chart-hgt active-tab block-rlink\" data-type=\"chuang\" href=\"javascript:;\" id=\"chuang\">\n",
      "        </a>\n",
      "        <div class=\"popup\">\n",
      "            <div class=\"popup-area\">\n",
      "                <div id=\"chart-time_sharing_diagram\" ></div>\n",
      "            </div>\n",
      "        </div>\n",
      "    </div>\n",
      "    <div class=\"chart-region\">\n",
      "        <div class=\"chart-area\">\n",
      "            <div id=\"chart-up_down_hot\" >\n",
      "                <span>真实热度</span>\n",
      "                <div class=\"chart-up_down_hot-down-area\">\n",
      "                    <div class=\"chart-up_down_hot-area\" id=\"chart-up_down_hot-area\">\n",
      "                        <img src=\"//sta.quchaogu.com/dxw/img/zhenshiredu.png\">\n",
      "                    </div>\n",
      "                </div>\n",
      "            </div>\n",
      "        </div>\n",
      "        <div class=\"chart-area\">\n",
      "            <div id=\"chart-up_down_distribution\"></div>\n",
      "        </div>\n",
      "        <div class=\"chart-area\">\n",
      "            <div id=\"chart-up_down_than\"></div>\n",
      "        </div>\n",
      "        <div class=\"chart-area\">\n",
      "            <div id=\"chart-up_down_stop_than\"></div>\n",
      "        </div>\n",
      "        <div class=\"chart-area\">\n",
      "            <div id=\"chart-yestaday_stop\"></div>\n",
      "        </div>\n",
      "    </div>\n",
      "</div>\n",
      "<script type=\"text/javascript\" src=\"//sta.quchaogu.com/dxw/js/highcharts.js\"></script>\n",
      "<script type=\"text/javascript\" src=\"//sta.quchaogu.com/dxw/js/highcharts-more.js\"></script>\n",
      "<script>\n",
      "    //上深创 鼠标移动悬浮 展示展现弹出层\n",
      "    $(\".chart-type a\").mouseover(function () {\n",
      "        //$(function () {\n",
      "        var type = $(this).data('type');\n",
      "        var code = '';\n",
      "        if(type == 'up'){\n",
      "            code = 'sh000001';\n",
      "        }\n",
      "\n",
      "        if(type == 'shen'){\n",
      "            code = 'sz399001';\n",
      "        }\n",
      "\n",
      "        if(type == 'chuang'){\n",
      "            code = 'sz399006';\n",
      "        }\n",
      "\n",
      "        $(this).children('img').attr('src','//sta.quchaogu.com/dxw/img/arrow_black.png');\n",
      "\n",
      "        $.ajax({\n",
      "            url:'/staringplate/charts/timesharingdiagram',\n",
      "            type:'post',\n",
      "            data:{\n",
      "                code:code\n",
      "            },\n",
      "            success:function (data) {\n",
      "                if(data.code == 10000 ) {\n",
      "                    timeSharingDiagram(data.data.min_data)\n",
      "                }\n",
      "            }\n",
      "        });\n",
      "        $(\".popup\").show();\n",
      "    });\n",
      "\n",
      "    $(\".chart-type a\").mouseout(function () {\n",
      "        $(\".popup\").hide();\n",
      "        $(\"#chart-time_sharing_diagram\").children().remove();\n",
      "        $(this).children('img').attr('src','//sta.quchaogu.com/dxw/img/arrow_gray.png');\n",
      "    });\n",
      "    var xAxis = [];\n",
      "    for(i = 1; i <= 240; i++){\n",
      "        xAxis.push(i);\n",
      "    }\n",
      "\n",
      "    //第一次加载页面请求数据\n",
      "    $(function () {\n",
      "        $.ajax({\n",
      "            url: 'staringplate/charts/chartsdata',\n",
      "            type: 'post',\n",
      "            data:{},\n",
      "            success:function (data) {\n",
      "                if(data.code != 10000){\n",
      "                    alert('请求图表数据错误！');\n",
      "                }else {\n",
      "                    upDownRate(data.data.up_down_rate);\n",
      "                    upDownStopRate(data.data.up_down_stop_rate);\n",
      "                    yesterdataStop(data.data.yesterday);\n",
      "                    upDownDistribution(data.data.up_down_distribution);\n",
      "                    hotChart(data.data.hot);\n",
      "                    appendUpShenChang(data.data.title);\n",
      "                }\n",
      "            }\n",
      "        });\n",
      "    })\n",
      "\n",
      "    //绘制涨跌分布\n",
      "    function upDownDistribution(data){\n",
      "        var chart1 = Highcharts.chart('chart-up_down_distribution',{\n",
      "            chart: {\n",
      "                type: 'column',\n",
      "                marginLeft: 50,\n",
      "                height: 140,\n",
      "                width:  200,\n",
      "                marginBottom: 25,\n",
      "                marginTop:50,\n",
      "                animation:false\n",
      "            },\n",
      "            xAxis: {\n",
      "                //enabled:false,\n",
      "                visible:false,\n",
      "                categories: ['100%', '5%', '3%','0%','-3%','-5%','-100%'],\n",
      "            },\n",
      "            credits: {\n",
      "                enabled: false\n",
      "            },\n",
      "            //colors:['#22a284','#22a284','#22a284','#22a284','#e70000','#e70000','#e70000','#e70000'],\n",
      "            title: {\n",
      "                text: '涨跌分布',\n",
      "                align: 'left',\n",
      "                style:{\n",
      "                    \"fontSize\":\"14px\",\n",
      "                    \"fontWeight\":\"bold\",\n",
      "                },\n",
      "                y:20\n",
      "            },\n",
      "            legend: {\n",
      "                enabled:false\n",
      "            },\n",
      "            tooltip: {\n",
      "                // head + 每个 point + footer 拼接成完整的 table\n",
      "                headerFormat: '<span style=\"font-size:10px;color: #ffffff\">{point.key}</span><table>',\n",
      "                pointFormat: '<tr><td style=\"color:#ffffff;padding:0\">{series.name}: </td>' +\n",
      "                    '<td style=\"padding:0;color: #ffffff\"><b>{point.y1}家</b></td></tr>',\n",
      "                footerFormat: '</table>',\n",
      "                shared: true,\n",
      "                useHTML: true,\n",
      "                backgroundColor:'rgba(0,0,0,0.70)',\n",
      "                borderWidth:0\n",
      "            },\n",
      "            yAxis: {\n",
      "                tickAmount: 3,\n",
      "                max:data.max,\n",
      "                tickPixelInterval: 10,\n",
      "                title:{\n",
      "                    enabled: false,\n",
      "                }\n",
      "            },\n",
      "            plotOptions: {\n",
      "                column: {\n",
      "                    borderWidth: 0\n",
      "                },\n",
      "            },\n",
      "            series: [{\n",
      "                data: data.data,\n",
      "                name: '数量',\n",
      "                // dataLabels: {\n",
      "                //     enabled: true,\n",
      "                //     color: '#111111',\n",
      "                //     format: '{point.y}', // :.1f 为保留 1 位小数\n",
      "                //     //x:10,\n",
      "                //     y:-20\n",
      "                // }\n",
      "            }]\n",
      "        });\n",
      "    }\n",
      "\n",
      "    //绘制涨跌停比\n",
      "    function upDownStopRate(data){\n",
      "        var chart1 = Highcharts.chart('chart-up_down_stop_than', {\n",
      "            chart: {\n",
      "                marginLeft: 40,\n",
      "                height: 140,\n",
      "                width:  200,\n",
      "                marginBottom: 25,\n",
      "                marginTop:50,\n",
      "            },\n",
      "            title: {\n",
      "                text: '涨跌停对比  <span style=\"color:#e70000;font-family: Bahnschrift\">'+data[0][data[0].length-1]['y']+'</span>:<span style=\"color:#22a284\">'+data[1][data[1].length-1]['y']+'</span>',\n",
      "                align: 'left',\n",
      "                style:{\n",
      "                    \"fontSize\":\"14px\",\n",
      "                    \"fontWeight\":\"bold\",\n",
      "                },\n",
      "                y:20\n",
      "            },\n",
      "            credits: {\n",
      "                enabled: false\n",
      "            },\n",
      "            yAxis: {\n",
      "                tickAmount: 3,\n",
      "                tickPixelInterval: 10,\n",
      "                title:{\n",
      "                    enabled: false,\n",
      "                }\n",
      "            },\n",
      "            legend: {\n",
      "                enabled:false\n",
      "            },\n",
      "            tooltip: {\n",
      "                shared: true,\n",
      "                useHTML: true,\n",
      "                headerFormat: '<small style=\"color:#ffffff\">{point.key}</small><table>',\n",
      "                pointFormat: '<tr><td style=\"color: #ffffff\">{series.name}: </td>' +\n",
      "                    '<td style=\"text-align: right;color: #ffffff\"><b>{point.y} 家</b></td></tr>',\n",
      "                footerFormat: '</table>',\n",
      "                backgroundColor:'rgba(0,0,0,0.70)',\n",
      "                borderWidth:0\n",
      "            },\n",
      "            xAxis: {\n",
      "                visible:false,\n",
      "                crosshair:true,\n",
      "                min:1,\n",
      "                max:241\n",
      "            },\n",
      "            colors: ['#e70000','#22a284'],\n",
      "            plotOptions: {\n",
      "                series: {\n",
      "                    // 针对所有数据列有效\n",
      "                    lineWidth: 1,\n",
      "                    marker: {\n",
      "                        radius: 1\n",
      "                    }\n",
      "                }\n",
      "            },\n",
      "            series: [{\n",
      "                data:data[0],\n",
      "                name:'涨停'\n",
      "            }, {\n",
      "                name:'跌停',\n",
      "                data:data[1]\n",
      "            }],\n",
      "\n",
      "        });\n",
      "    }\n",
      "\n",
      "    //绘制涨跌比\n",
      "    function upDownRate(data){\n",
      "        var chart1 = Highcharts.chart('chart-up_down_than', {\n",
      "            chart: {\n",
      "                marginLeft: 40,\n",
      "                height: 140,\n",
      "                width:  200,\n",
      "                marginBottom: 25,\n",
      "                marginTop:50,\n",
      "            },\n",
      "            title: {\n",
      "                text: '涨跌对比  <span style=\"color:#e70000\">'+data[0][data[0].length-1]['y']+'</span>:<span style=\"color:#22a284\">'+data[1][data[1].length-1]['y']+'</span>',\n",
      "                align: 'left',\n",
      "                style:{\n",
      "                    \"fontSize\":\"14px\",\n",
      "                    \"fontWeight\":\"bold\",\n",
      "                },\n",
      "                y:20\n",
      "            },\n",
      "            legend: {\n",
      "                enabled:false\n",
      "            },\n",
      "            credits: {\n",
      "                enabled: false\n",
      "            },\n",
      "            tooltip: {\n",
      "                shared: true,\n",
      "                useHTML: true,\n",
      "                headerFormat: '<small style=\"color: #ffffff\">{point.key}</small><table>',\n",
      "                pointFormat: '<tr><td style=\"color: #ffffff\">{series.name}: </td>' +\n",
      "                    '<td style=\"text-align: right;color:#ffffff\"><b>{point.y} 家</b></td></tr>',\n",
      "                footerFormat: '</table>',\n",
      "                backgroundColor:'rgba(0,0,0,0.70)',\n",
      "                borderWidth:0\n",
      "            },\n",
      "            xAxis: {\n",
      "                visible:false,\n",
      "                crosshair:true,\n",
      "                min:1,\n",
      "                max:241\n",
      "            },\n",
      "            yAxis: {\n",
      "                tickAmount: 3,\n",
      "                tickPixelInterval: 10,\n",
      "                title:{\n",
      "                    enabled: false,\n",
      "                }\n",
      "            },\n",
      "            plotOptions: {\n",
      "                series: {\n",
      "                    // 针对所有数据列有效\n",
      "                    lineWidth: 1,\n",
      "                    marker: {\n",
      "                        radius: 1\n",
      "                    }\n",
      "                }\n",
      "            },\n",
      "            colors: ['#e70000','#22a284'],\n",
      "            series: [{\n",
      "                data:data[0],\n",
      "                name:'涨'\n",
      "            }, {\n",
      "                name:'跌',\n",
      "                data:data[1]\n",
      "            }],\n",
      "\n",
      "        });\n",
      "    }\n",
      "\n",
      "    //绘制昨日涨停今现\n",
      "    function yesterdataStop(data){\n",
      "        var color = data[0][data[0].length-1][\"y\"] > 0 ? \"#e70000\":\"#22a284\";\n",
      "        var chart1 = Highcharts.chart('chart-yestaday_stop', {\n",
      "            chart: {\n",
      "                marginLeft: 35,\n",
      "                height: 140,\n",
      "                width:  200,\n",
      "                marginBottom: 25,\n",
      "                marginTop:50,\n",
      "                animation:false\n",
      "            },\n",
      "            title: {\n",
      "                text: '昨日涨跌今现  <span style=\"color:'+color+'\">'+data[0][data[0].length-1]['y']+'%</span>',\n",
      "                align: 'left',\n",
      "                style:{\n",
      "                    \"fontSize\":\"14px\",\n",
      "                    \"fontWeight\":\"bold\",\n",
      "                },\n",
      "                y:20\n",
      "            },\n",
      "            tooltip: {\n",
      "                shared: true,\n",
      "                useHTML: true,\n",
      "                headerFormat: '<small style=\"color: #ffffff\">{point.key}</small><table>',\n",
      "                pointFormat: '<tr><td style=\"color: #ffffff\">{series.name}: </td>' +\n",
      "                    '<td style=\"text-align: right;color: #ffffff\"><b>{point.y} %</b></td></tr>',\n",
      "                footerFormat: '</table>',\n",
      "                valueDecimals: 2,\n",
      "                backgroundColor:'rgba(0,0,0,0.70)',\n",
      "                borderWidth:0\n",
      "            },\n",
      "            legend: {\n",
      "                enabled:false\n",
      "            },\n",
      "            xAxis: {\n",
      "                visible:false,\n",
      "                crosshair:true,\n",
      "                min:1,\n",
      "                max:241\n",
      "            },\n",
      "            yAxis: {\n",
      "                tickAmount: 3,\n",
      "                tickPixelInterval: 10,\n",
      "                title:{\n",
      "                    enabled: false,\n",
      "                }\n",
      "            },\n",
      "            credits: {\n",
      "                enabled: false\n",
      "            },\n",
      "            plotOptions: {\n",
      "                series: {\n",
      "                    // 针对所有数据列有效\n",
      "                    lineWidth: 1,\n",
      "                    marker: {\n",
      "                        radius: 1\n",
      "                    }\n",
      "                }\n",
      "            },\n",
      "            colors: ['#e70000'],\n",
      "            series: [{\n",
      "                name:'昨日涨停今现',\n",
      "                data:data[0],\n",
      "            }],\n",
      "\n",
      "        });\n",
      "    }\n",
      "\n",
      "    function hotChart(data) {\n",
      "        if(data){\n",
      "            var divWidth    = 160;\n",
      "            var hotDivWidth = (divWidth/100)*data;\n",
      "            var color       = data>50 ? \"#E70000\" : \"#22a284\";\n",
      "            $(\"#chart-up_down_hot-area\").css(\"width\",hotDivWidth);\n",
      "            $(\"#chart-up_down_hot span\").html('真实热度  <font style=\"font-size: 18px;color: '+color+'\">'+data+\"%</font>\");\n",
      "        }\n",
      "    }\n",
      "\n",
      "    //上 深 创 数据\n",
      "    function timeSharingDiagram(data){\n",
      "        var chart1 = Highcharts.chart('chart-time_sharing_diagram', {\n",
      "            chart: {\n",
      "                marginLeft: 10,\n",
      "                height: 133,\n",
      "                width:  230,\n",
      "                marginBottom: 25,\n",
      "                marginTop:25,\n",
      "                marginRight: 50,\n",
      "                //animation:false\n",
      "            },\n",
      "            xAxis: {\n",
      "                visible:false,\n",
      "                min:1,\n",
      "                max:241\n",
      "            },\n",
      "            title: {\n",
      "                text: data.title.name+' <span style=\"color: '+data.title.color+'\">'+data.title.newprice+' '+data.title.rate+'%</span>',\n",
      "                align: 'left',\n",
      "                style:{\n",
      "                    \"fontSize\":\"14px\",\n",
      "                    \"fontWeight\":\"bold\",\n",
      "                },\n",
      "                y:20,\n",
      "                width:200\n",
      "            },\n",
      "            credits:{\n",
      "                enabled:false\n",
      "            },\n",
      "            legend: {\n",
      "                enabled:false\n",
      "            },\n",
      "            yAxis: [{\n",
      "                title: 'Link A',\n",
      "                height: 50,\n",
      "                top:40,\n",
      "                tickAmount: 3,\n",
      "                tickPixelInterval: 10,\n",
      "                labels: {\n",
      "                    align: 'left',\n",
      "                    useHTML : true,\n",
      "                    style: {\n",
      "                        color: '#999'\n",
      "                    },\n",
      "                    formatter: function () {\n",
      "                        if (this.value < 0) {\n",
      "                            return '<span style=\"position:absolute;top:-12px;\">' +\n",
      "                                this.value + '</span>';\n",
      "                        }\n",
      "                        if (this.value == 0) return \"\";\n",
      "                        return '<span style=\"position:absolute;\">' +\n",
      "                            this.value + '</span>';\n",
      "                    },\n",
      "                    x: 0,\n",
      "                    y: 10\n",
      "                },\n",
      "            }, {\n",
      "                title: \"分钟流向\",\n",
      "                height: 30,\n",
      "                top:100,\n",
      "                opposite:true,\n",
      "                tickAmount: 3,\n",
      "                tickPixelInterval: 10,\n",
      "                labels: {\n",
      "                    align: 'left',\n",
      "                    useHTML : true,\n",
      "                    style: {\n",
      "                        color: '#999'\n",
      "                    },\n",
      "                    formatter : function() {\n",
      "\n",
      "                    },\n",
      "                    x: 0,\n",
      "                    y: 10\n",
      "                }\n",
      "            }],\n",
      "            plotOptions: {\n",
      "                series: {\n",
      "                    color: '#212121',\n",
      "                    lineWidth:1\n",
      "                }\n",
      "            },\n",
      "            tooltip:{\n",
      "                enabled:false\n",
      "            },\n",
      "            series: [\n",
      "                {\n",
      "                    type: 'column',\n",
      "                    yAxis: 1,\n",
      "                    data: data.amount,\n",
      "                },{\n",
      "                    type: 'spline',\n",
      "                    yAxis: 0,\n",
      "                    data: data.price,\n",
      "                }]\n",
      "        });\n",
      "    }\n",
      "\n",
      "    //渲染上 ，深 ，创\n",
      "    function appendUpShenChang(data) {\n",
      "        if(data.sh000001){\n",
      "            var html = '<span>'+data.sh000001.name+'  </span><span style=\"color: '+data.sh000001.color+'\" class=\"a-title\">'+data.sh000001.price+'  '+data.sh000001.rate+'%</span> <img src=\"//sta.quchaogu.com/dxw/img/arrow_gray.png\">';\n",
      "            $(\".chart-type #up\").html(html);\n",
      "        }\n",
      "\n",
      "        if(data.sz399001){\n",
      "            var html = '<span>'+data.sz399001.name+'  </span><span style=\"color: '+data.sz399001.color+'\" class=\"a-title\">'+data.sz399001.price+'  '+data.sz399001.rate+'%</span> <img src=\"//sta.quchaogu.com/dxw/img/arrow_gray.png\">';\n",
      "            $(\".chart-type #shen\").html(html);\n",
      "        }\n",
      "\n",
      "        if(data.sz399006){\n",
      "            var html = '<span>'+data.sz399006.name+'  </span><span style=\"color: '+data.sz399006.color+'\" class=\"a-title\">'+data.sz399006.price+'  '+data.sz399006.rate+'%</span> <img src=\"//sta.quchaogu.com/dxw/img/arrow_gray.png\">';\n",
      "            $(\".chart-type #chuang\").html(html);\n",
      "        }\n",
      "\n",
      "    }\n",
      "\n",
      "    //每隔10秒请求数据\n",
      "    window.setInterval(function () {\n",
      "        var isTranDay = $(\"#isTranDay\").val();\n",
      "        if(isTranDay == 2){//isTranDay = 1 是交易日  2 不是交易日\n",
      "            return false;\n",
      "        }\n",
      "        //\"January 12,2006 9:00:35\"\n",
      "        var isTranTime = dateFtt(\"hhmm\",new Date());\n",
      "\n",
      "        if((930<isTranTime && isTranTime<1130) || (1300<isTranTime && isTranTime<1500)){\n",
      "\n",
      "        }else{\n",
      "            return false;\n",
      "        }\n",
      "\n",
      "        $.ajax({\n",
      "            url: 'staringplate/charts/chartsdata',\n",
      "            type: 'post',\n",
      "            data:{},\n",
      "            success:function (data) {\n",
      "                if(data.code != 10000){\n",
      "                    alert('请求图表数据错误！');\n",
      "                }else {\n",
      "                    upDownRateUpdate(data.data.up_down_rate);\n",
      "                    upDownStopRateUpdate(data.data.up_down_stop_rate);\n",
      "                    yesterdataStopUpdate(data.data.yesterday);\n",
      "                    upDownDistributionUpdate(data.data.up_down_distribution);\n",
      "                    hotChart(data.data.hot);\n",
      "                    appendUpShenChang(data.data.title);\n",
      "                    $(\"#isTranDay\").val(data.data.isTranDay);//设置是否是交易日\n",
      "                }\n",
      "            }\n",
      "        });\n",
      "    },10000);\n",
      "\n",
      "    //更新一次涨跌对比\n",
      "    function upDownRateUpdate(data){\n",
      "        //获取涨跌对比绘图区对象\n",
      "        var charts = $(\"#chart-up_down_than\").highcharts();\n",
      "        // data[0].push({'y':956,'name':'15:07'});\n",
      "        // data[1].push({'y':1500,'name':'15:07'});\n",
      "        //两条线分别添加点\n",
      "        if(data[0].length>charts.series[0].data.length && data[1].length>charts.series[1].data.length){\n",
      "            charts.series[0].addPoint(data[0][data[0].length-1]);\n",
      "            charts.series[1].addPoint(data[1][data[1].length-1]);\n",
      "            var title = {'text':'涨跌对比  <span style=\"color:#e70000\">'+data[0][data[0].length-1]['y']+'</span>:<span style=\"color:#22a284\">'+data[1][data[1].length-1]['y']+'</span>'}\n",
      "            charts.setTitle(title);//修改title\n",
      "        }\n",
      "    }\n",
      "\n",
      "    //更新涨跌停比\n",
      "    function upDownStopRateUpdate(data){\n",
      "        //获取涨跌停比绘图区对象\n",
      "        var charts = $(\"#chart-up_down_stop_than\").highcharts();\n",
      "        //两条线分别添加点\n",
      "        if(data[0].length>charts.series[0].data.length && data[1].length>charts.series[1].data.length){\n",
      "            charts.series[0].addPoint(data[0][data[0].length-1]);\n",
      "            charts.series[1].addPoint(data[1][data[1].length-1]);\n",
      "            var title = {'text':'涨跌停对比  <span style=\"color:#e70000\">'+data[0][data[0].length-1]['y']+'</span>:<span style=\"color:#22a284\">'+data[1][data[1].length-1]['y']+'</span>'}\n",
      "            charts.setTitle(title);//修改title\n",
      "        }\n",
      "    }\n",
      "\n",
      "    //更新昨日涨跌今现\n",
      "    function yesterdataStopUpdate(data) {\n",
      "        //获取昨日涨跌今日现绘图区对象\n",
      "        var charts = $(\"#chart-yestaday_stop\").highcharts();\n",
      "        var color  = data[0][data[0].length-1]['y']>0 ? '#e70000':'#22a284';\n",
      "        if(data[0].length>charts.series[0].data.length){\n",
      "            charts.series[0].addPoint(data[0][data[0].length-1]);//添加点\n",
      "            var title = {'text':'昨日涨跌今现  <span style=\"color:'+color+'\">'+data[0][data[0].length-1]['y']+'%</span>'}\n",
      "            charts.setTitle(title);//设置标题\n",
      "        }\n",
      "    }\n",
      "\n",
      "    //更新涨跌分布\n",
      "    function upDownDistributionUpdate(data){\n",
      "\n",
      "        //数据获取失败的情况\n",
      "        if(data.length<0){\n",
      "            return false;\n",
      "        }\n",
      "        //获取涨跌分布绘画区highcharts对象\n",
      "        var chartUpDownDistribution = $(\"#chart-up_down_distribution\").highcharts();\n",
      "        //修改y轴最大值\n",
      "        if(data.max>chartUpDownDistribution.yAxis[0].max){\n",
      "            chartUpDownDistribution.yAxis[0].setExtremes(0,data.max);\n",
      "        }\n",
      "\n",
      "        //修改series里面的数据\n",
      "        for(var j = 0; j<chartUpDownDistribution.series[0].data.length; j++){\n",
      "            if(data.data[j].length>0 && chartUpDownDistribution.series[0].data[j].y != data.data[j].y){\n",
      "                chartUpDownDistribution.series[0].data[j].update(data.data[j].y);\n",
      "            }\n",
      "        }\n",
      "    }\n",
      "\n",
      "</script>\n",
      "\n",
      "            <div class=\"tools-board\">\n",
      "                <div class=\"tools-item\">\n",
      "                    <div class=\"content-title\">\n",
      "                        <div class=\"title-icon\">&nbsp;</div>\n",
      "                        <div class=\"title-text\">\n",
      "                            <span class=\"title-font\">报盘</span>\n",
      "                        </div>\n",
      "                        <div class=\"title-icon-lab\" style=\"display:inline\">\n",
      "<!--                            <a href=\"javascript:;\">全部<label class=\"glyphicon glyphicon-circle-arrow-right\"></label></a>-->\n",
      "                        </div>\n",
      "                    </div>\n",
      "                    <div class=\"content-area\">\n",
      "                        <table id=\"baoPanTable\">\n",
      "                        </table>\n",
      "                    </div>\n",
      "                </div>\n",
      "                <div class=\"tools-item right\">\n",
      "                    <div class=\"content-title\">\n",
      "                        <div class=\"title-icon\">&nbsp;</div>\n",
      "                        <div class=\"title-text\">\n",
      "                            <span class=\"title-font\">快讯</span>\n",
      "                        </div>\n",
      "                        <div class=\"title-icon-lab\" style=\"display:inline\">\n",
      "<!--                            <a href=\"javascript:;\">全部<label class=\"glyphicon glyphicon-circle-arrow-right\"></label></a>-->\n",
      "                        </div>\n",
      "                    </div>\n",
      "                    <div class=\"content-area news_text_area\" id=\"news_text_area\" style=\"height: 165px;\">\n",
      "<!--                        <div class=\"content-area-new1\" style=\"height: 55px;width: 590px; overflow:hidden;\"></div>-->\n",
      "<!--                        <div class=\"content-area-new2\" style=\"height: 55px;width: 590px; overflow:hidden;\"></div>-->\n",
      "                    </div>\n",
      "                </div>\n",
      "            </div>\n",
      "            <div class=\"tools-board bootstrap-tab-css\">\n",
      "                <div class=\"col-xs-1 bootstrap-tab-item\">\n",
      "                    <ul class=\"nav nav-tab\" id=\"vtab\">\n",
      "                        <li class=\"active\"><a href=\"#tab1\" data-toggle=\"tab\">打板</a></li>\n",
      "<!--                        <li><a href=\"#tab2\" data-toggle=\"tab\">自选</a></li>-->\n",
      "<!--                        <li><a href=\"#tab3\" data-toggle=\"tab\">机会</a></li>-->\n",
      "                        <li onclick=\"getBanKuai()\"><a href=\"#tab4\" data-toggle=\"tab\">板块</a></li>\n",
      "                        <li><a href=\"#tab5\" data-toggle=\"tab\">联动</a></li>\n",
      "                    </ul>\n",
      "                </div>\n",
      "                <div class=\"col-xs-11 vertical-tab-content tab-content\">\n",
      "                    <div role=\"tabpanel\" class=\"tab-pane active\" id=\"tab1\">\n",
      "                        <ul id=\"myTab\" class=\"nav nav-tabs\">\n",
      "                            <li class=\"active\" onclick=\"daBanInfoList('up_stop')\">\n",
      "                                <a href=\"#up_stop\" data-toggle=\"tab\" data-type=\"up_stop\">涨停</a>\n",
      "                            </li>\n",
      "                            <li onclick=\"daBanInfoList('once_up_stop')\" data-type=\"once_up_stop\"><a href=\"#once_up_stop\" data-toggle=\"tab\" >曾涨停</a></li>\n",
      "                            <li onclick=\"daBanInfoList('yesterday_stop')\" data-type=\"yesterday_stop\"><a href=\"#yesterday_stop\" data-toggle=\"tab\">昨涨停</a></li>\n",
      "                            <li onclick=\"daBanInfoList('speed_up')\" data-type=\"speed_up\"><a href=\"#speed_up\" data-toggle=\"tab\" >涨速榜</a></li>\n",
      "                            <li onclick=\"daBanInfoList('biao_gan_stock')\" data-type=\"biao_gan_stock\"><a href=\"#biao_gan_stock\" data-toggle=\"tab\" >标杆股</a></li>\n",
      "                            <li onclick=\"daBanInfoList('sub_new_stock')\" data-type=\"sub_new_stock\"><a href=\"#sub_new_stock\" data-toggle=\"tab\" >次新股</a></li>\n",
      "                            <li onclick=\"daBanInfoList('new_stocks')\" data-type=\"new_stocks\"><a href=\"#new_stocks\" data-toggle=\"tab\" >新股</a></li>\n",
      "                        </ul>\n",
      "                        <div id=\"myTabContent\" class=\"tab-content\">\n",
      "                            <div class=\"tab-pane fade in active\" id=\"up_stop\">\n",
      "                                <div class=\"\">\n",
      "                                    <div class=\"up_stop_table_area\">\n",
      "                                        <table class=\"up_stop_table\" id=\"up_stop_table\">\n",
      "                                            <tr>\n",
      "                                                <th class=\"th90\"  data-type=\"\" data-val=\"\">\n",
      "                                                    股票\n",
      "                                                    <div class=\"cancle-btu\">\n",
      "                                                        <button onclick=\"cancelSort('up_stop_table','up_stop')\">取消排序</button>\n",
      "                                                    </div>\n",
      "                                                </th>\n",
      "                                                <th class=\"th50 th-flaot-right\" data-type=\"percent\" data-val=\"\">\n",
      "                                                    涨幅<label class=\"\"></label>\n",
      "                                                </th>\n",
      "                                                <th class=\"th180\" data-type=\"\" data-val=\"\">\n",
      "                                                    涨停揭秘<label class=\"\"></label>\n",
      "                                                </th>\n",
      "                                                <th class=\"th70\" data-type=\"zt_time\" onclick=\"tabClickSort($(this),'up_stop')\" data-val=\"desc\">\n",
      "                                                    <a href=\"javascript:;\">涨跌时间</a><label class=\"glyphicon glyphicon-arrow-down label_iocn_red\"></label>\n",
      "                                                </th>\n",
      "                                                <th class=\"th80\" data-type=\"day_zt\" onclick=\"tabClickSort($(this),'up_stop')\" data-val=\"asc\">\n",
      "                                                    <a href=\"javascript:;\">几天几板</a><label class=\"\"></label>\n",
      "                                                </th>\n",
      "                                                <th class=\"th110\" data-type=\"bk_name\" onclick=\"tabClickSort($(this),'up_stop')\" data-val=\"asc\">\n",
      "                                                    <a href=\"javascript:;\">板块(涨停数)</a><label class=\"\"></label>\n",
      "                                                </th>\n",
      "                                                <th class=\"th70 th-flaot-right\" data-type=\"fengban\" onclick=\"tabClickSort($(this),'up_stop')\" data-val=\"asc\">\n",
      "                                                    <a href=\"javascript:;\">封单(元)</a><label class=\"\"></label>\n",
      "                                                </th>\n",
      "                                                <th class=\"th70 th-flaot-right\" data-type=\"turnover\" onclick=\"tabClickSort($(this),'up_stop')\" data-val=\"asc\">\n",
      "                                                    <a href=\"javascript:;\">换手率</a><label class=\"\"></label>\n",
      "                                                </th>\n",
      "                                                <th class=\"th80 th-flaot-right\" data-type=\"zlje\" onclick=\"tabClickSort($(this),'up_stop')\" data-val=\"asc\">\n",
      "                                                    <a href=\"javascript:;\">主力资金</a><label class=\"\"></label>\n",
      "                                                </th>\n",
      "                                                <th class=\"th50 th-flaot-right\" data-type=\"guxing\" onclick=\"tabClickSort($(this),'up_stop')\" data-val=\"asc\">\n",
      "                                            \n"
     ]
    }
   ],
   "source": [
    "import requests\n",
    "res=requests.get('http://www.duanxianwang.cn/')\n",
    "res.encoding='utf-8'\n",
    "print(res.text)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "up_stop_table_area"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "ename": "MissingSchema",
     "evalue": "Invalid URL 'staringplate/staringplate/infolist': No schema supplied. Perhaps you meant http://staringplate/staringplate/infolist?",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mMissingSchema\u001b[0m                             Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-21-09d626a88018>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      2\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mrequests\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mres\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mrequests\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'staringplate/staringplate/infolist'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      4\u001b[0m \u001b[0mres\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mencoding\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'utf-8'\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      5\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mres\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtext\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\ProgramData\\Anaconda5.0\\lib\\site-packages\\requests\\api.py\u001b[0m in \u001b[0;36mget\u001b[1;34m(url, params, **kwargs)\u001b[0m\n\u001b[0;32m     73\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     74\u001b[0m     \u001b[0mkwargs\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msetdefault\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'allow_redirects'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 75\u001b[1;33m     \u001b[1;32mreturn\u001b[0m \u001b[0mrequest\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'get'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0murl\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mparams\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mparams\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     76\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     77\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\ProgramData\\Anaconda5.0\\lib\\site-packages\\requests\\api.py\u001b[0m in \u001b[0;36mrequest\u001b[1;34m(method, url, **kwargs)\u001b[0m\n\u001b[0;32m     58\u001b[0m     \u001b[1;31m# cases, and look like a memory leak in others.\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     59\u001b[0m     \u001b[1;32mwith\u001b[0m \u001b[0msessions\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mSession\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0msession\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 60\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0msession\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrequest\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmethod\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mmethod\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0murl\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0murl\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     61\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     62\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\ProgramData\\Anaconda5.0\\lib\\site-packages\\requests\\sessions.py\u001b[0m in \u001b[0;36mrequest\u001b[1;34m(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)\u001b[0m\n\u001b[0;32m    517\u001b[0m             \u001b[0mhooks\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mhooks\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    518\u001b[0m         )\n\u001b[1;32m--> 519\u001b[1;33m         \u001b[0mprep\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mprepare_request\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mreq\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    520\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    521\u001b[0m         \u001b[0mproxies\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mproxies\u001b[0m \u001b[1;32mor\u001b[0m \u001b[1;33m{\u001b[0m\u001b[1;33m}\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\ProgramData\\Anaconda5.0\\lib\\site-packages\\requests\\sessions.py\u001b[0m in \u001b[0;36mprepare_request\u001b[1;34m(self, request)\u001b[0m\n\u001b[0;32m    460\u001b[0m             \u001b[0mauth\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mmerge_setting\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mauth\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mauth\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    461\u001b[0m             \u001b[0mcookies\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mmerged_cookies\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 462\u001b[1;33m             \u001b[0mhooks\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mmerge_hooks\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mrequest\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mhooks\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mhooks\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    463\u001b[0m         )\n\u001b[0;32m    464\u001b[0m         \u001b[1;32mreturn\u001b[0m \u001b[0mp\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\ProgramData\\Anaconda5.0\\lib\\site-packages\\requests\\models.py\u001b[0m in \u001b[0;36mprepare\u001b[1;34m(self, method, url, headers, files, data, params, auth, cookies, hooks, json)\u001b[0m\n\u001b[0;32m    311\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    312\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mprepare_method\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmethod\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 313\u001b[1;33m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mprepare_url\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0murl\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mparams\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    314\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mprepare_headers\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mheaders\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    315\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mprepare_cookies\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mcookies\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\ProgramData\\Anaconda5.0\\lib\\site-packages\\requests\\models.py\u001b[0m in \u001b[0;36mprepare_url\u001b[1;34m(self, url, params)\u001b[0m\n\u001b[0;32m    385\u001b[0m             \u001b[0merror\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0merror\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mformat\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mto_native_string\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0murl\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'utf8'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    386\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 387\u001b[1;33m             \u001b[1;32mraise\u001b[0m \u001b[0mMissingSchema\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0merror\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    388\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    389\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0mhost\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mMissingSchema\u001b[0m: Invalid URL 'staringplate/staringplate/infolist': No schema supplied. Perhaps you meant http://staringplate/staringplate/infolist?"
     ]
    }
   ],
   "source": [
    "\n",
    "import requests\n",
    "res=requests.get('staringplate/staringplate/infolist')\n",
    "res.encoding='utf-8'\n",
    "print(res.text)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
